home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 98 / CD-ROM 98.iso / infantil / tuxmath / tuxmath-2001.09.07-win32-installer.exe / src / playsound.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-07  |  529 b   |  34 lines

  1. /*
  2.   playsound.c
  3.  
  4.   For TuxMath
  5.   Plays a sound (if sound support is enabled)
  6.  
  7.   by Bill Kendrick
  8.   bill@newbreedsoftware.com
  9.   http://www.newbreedsoftware.com/
  10.  
  11.   Part of "Tux4Kids" Project
  12.   http://www.tux4kids.org/
  13.   
  14.   August 28, 2001 - September 6, 2001
  15. */
  16.  
  17.  
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20. #include <SDL.h>
  21. #ifndef NOSOUND
  22. #include <SDL_mixer.h>
  23. #endif
  24. #include "setup.h"
  25.  
  26.  
  27. void playsound(int snd)
  28. {
  29. #ifndef NOSOUND
  30.   if (use_sound)
  31.     Mix_PlayChannel(-1, sounds[snd], 0);
  32. #endif
  33. }
  34.